<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=0.5,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../css/mui.min.css">

	</head>
	<body><br /><br />
		<div id="lllll">
			
		</div>
		<br />
		<div style="text-align: center;">
			<input onclick="fun_btn(1);" type="button" id="btn1" value="视频1" style="height: 50px; width: 200px;" /><br /><br />
			<input onclick="fun_btn(2);" type="button" id="btn1" value="视频2" style="height: 50px; width: 200px;" /><br /><br />
			<input onclick="fun_btn(3);" type="button" id="btn1" value="视频3" style="height: 50px; width: 200px;" />
		</div>
			
	</body>
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/utils/http.utils.js"></script>
	<script>
		var $video1 = "http://yuntv.letv.com/bcloud.html?uu=ts1nlqzwrw&vu=97839ee69a&auto_play=1&width=640&height=360&lang=zh_CN";
		var $video2 = "http://yuntv.letv.com/bcloud.html?uu=ts1nlqzwrw&vu=fd924934d6&auto_play=1&width=640&height=360&lang=zh_CN";
		var $video3 = "http://yuntv.letv.com/bcloud.html?uu=ts1nlqzwrw&vu=fd924934d6&auto_play=1&width=640&height=360&lang=zh_CN";
		window.onload = function(){
			mui.ajax({
				url : $request_url.getCourseVideoInfo,
				type : "get",
				dataType : "json",
				headers: {
					"Authorization": $headers_authorization
				},
				data : {
					mediaType : "video",
					typeCode : "DYZ_ZX",
					orgId : "",
					rows : 5,
					page : 0
				},
				success : function(dat){
					if(dat.code == 0){
						console.log(dat.result)
					} else {
						mui.toast(dat.message);
					}
				}, error : function(err){
					mui.toast("服务繁忙");
				}
			});
		}
		
		function fun_btn($num){
			document.getElementById("lllll").innerHTML = "";
			var $videoUrl;
			if($num == 1){
				$videoUrl = $video1;
			}
			
			if($num == 2){
				$videoUrl = $video2;
			}
			
			if($num == 3){
				$videoUrl = $video3;
			}
			var $dochtml = document.getElementById("lllll")
			var $creElc = document.createElement('div');
			$creElc.innerHTML = llss($videoUrl);
			$dochtml.appendChild($creElc);
			//location.reload(false);
		}
		
		function llss($url){
			var html = 
			'<div style="text-align: center;">'
			+'<embed id="emb_video" style="text-align: center;" src="'+ $url +'" allowFullScreen="true" quality="high" align="middle" allowScriptAccess="always" width="640" height="360"></embed>'
			+'</div>';
			return html;
		}
	</script>
</html>
